feat(engine): secret redaction mode, superseded detail, delta recall, enhanced auto routing - #188
Closed
Coding-Dev-Tools wants to merge 3 commits into
Closed
feat(engine): secret redaction mode, superseded detail, delta recall, enhanced auto routing#188Coding-Dev-Tools wants to merge 3 commits into
Coding-Dev-Tools wants to merge 3 commits into
Conversation
…all, and enhanced auto routing
- Secret redaction mode: opt-in redact_secrets flag in MemoryEngine.remember and MemoryService.remember masks detected credentials safely to <redacted> instead of failing agent writes.
- Superseded detail: invalidation write resolution returns superseded_detail (id, content_preview, prior stability_days, prior access_count).
- Delta recall: SearchFilter.modified_since enables streaming incremental recall (ingested_at >= ?) to minimize agent token usage.
- Enhanced auto routing: DeterministicRetrievalPolicy recognizes structural/relationship tokens ('connected', 'superseded') and definitions ('interface', 'struct').
- Full test coverage across all 4 capabilities, all 12 CI gates verified green.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… parser to eliminate CodeQL polynomial ReDoS - Replaces _PEM_BLOCK regex in redact_secrets with an O(N) linear-time str.find scanner _redact_pem. - Eliminates the py/polynomial-redos CodeQL static analysis vulnerability caused by backtracking over repeated PEM headers. - Adds test coverage verifying linear execution time on repeated PEM headers in tests/test_secrets_edge_cases.py.
…nner in _PATTERNS - Replaces regex-based PEM header search in _PATTERNS with linear _contains_pem_header and _PEMHeaderPattern. - Ensures safe initialization in redact_secrets and provides ReDoS execution time test.
Owner
Author
|
Superseded by #187 (same base branch content: feat/engine-enhancements). The CodeQL polynomial-ReDoS alert on the PEM-header regex was fixed in #187 by an equivalent (and further-hardened, O(N) with monotone find-caching) linear scan; the .sub() contract gap on the find-based PEM pattern is also addressed there. Closing this duplicate to keep a single delivery path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine capabilities: redaction, supersession detail, delta recall, smarter routing
Single commit on top of the 1.7 release (
d7d597ce). 9 files, +105/−8.Capabilities
MemoryEngine.remember/remember_with_resolutionandMemoryService.rememberacceptredact_secrets: bool = False. When set, content and title are passed through the existingredact_secretssanitizer before write; the strictreject_secretsboundary stays unchanged for the default path (fail-closed preserved, opt-in redaction).superseded_detailfor the predecessor:{id, content_preview (120 chars), stability_days, access_count}— enough for callers to show the "what did this replace" context without a second round-trip.modified_since) —SearchFilter.modified_since(finite-timestamp validated) filters records bymax(ingested_at, updated_at); implemented in both the in-memorymemory_matches_filterpredicate and the SQL WHERE path so vector/lexical/graph arms andget_memoriesall honor it consistently.interface,struct); relationship intent pattern now recognizesconnected/connections/superseded/supersedes, aligning auto-profile routing with the supersession surface added above.Verification
test_secret_hygiene,test_secrets_edge_cases,test_bitemporal_recall,test_release_write_path,test_retrieval_policy— all green.Non-goals
modified_since.